home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / include / stdlib.h < prev    next >
C/C++ Source or Header  |  1996-01-30  |  1KB  |  57 lines

  1. /* This is file stdlib.h */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. #ifndef _STDLIB_H_
  15. #define _STDLIB_H_
  16.  
  17. #include <djgppstd.h>
  18.  
  19. #define RAND_MAX 65536
  20.  
  21. typedef struct {
  22.   int quot;
  23.   int rem;
  24. } div_t;
  25.  
  26. typedef struct {
  27.   long quot;
  28.   long rem;
  29. } ldiv_t;
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #define EXIT_SUCCESS 0
  36. #define EXIT_FAILURE 1
  37.   
  38. div_t div(int number, int demon);
  39. ldiv_t ldiv(long number, long demon);
  40.  
  41. #define MB_CUR_MAX __mb_cur_max
  42. /* max = shift, four bytes of value (guess) */
  43. #define MB_LEN_MAX 5
  44.  
  45. extern int __mb_cur_max;
  46. int mblen(const char *s, size_t n);
  47. size_t mbstowcs(wchar_t *wcs, const char *s, size_t n);
  48. int mbtowc(wchar_t *pwc, const char *s, size_t n);
  49. size_t wcstombs(char *s, const wchar_t *wcs, size_t n);
  50. int wctomb(char *s, wchar_t wchar);
  51.  
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55.  
  56. #endif
  57.